const state = {
    schemes: [],
    activeIndex: 0,
    layerControl: ['', false],
    tfdType: 'tree', // tree, freeze, doc
    tfdLeft: '365px',
    disabledFunc: '',
}
const mutations = {
    SET_LIST: (state, schemes) => {
        state.schemes = schemes
    },
    SET_INDEX: (state, activeIndex) => {
        state.activeIndex = activeIndex
    },
    SET_LAYERCONTROL: (state, layerControl) => {
        state.layerControl[0] == layerControl ?
            (state.layerControl = ['', false]) :
            (state.layerControl = [layerControl, true])
    },
    SET_TFD_TYPE: (state, f) => {
        state.tfdType = f;
    },
    SET_TFD_LEFT: (state, n) => {
        state.tfdLeft = `${n+0.9}rem`;
    },
    SET_DISABLED_FUNC: (state, t) => {
        state.disabledFunc = t;
    },

}
const actions = {}

export default {
    namespaced: true,
    state,
    mutations,
    actions,
}